Skip to content

docs: add Important Metrics to Monitor section#894

Merged
garrett4wade merged 2 commits into
mainfrom
metrics_to_minitor
Feb 5, 2026
Merged

docs: add Important Metrics to Monitor section#894
garrett4wade merged 2 commits into
mainfrom
metrics_to_minitor

Conversation

@xssstory

@xssstory xssstory commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

Description

Add a comprehensive "Important Metrics to Monitor" section to the RL performance
diagnostics guide. This includes three subsections covering reward metrics,
importance weight metrics (with decoupled PPO loss formulation), and sequence
length metrics, along with troubleshooting guidance for each.

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Checklist

  • I have read the Contributing Guide
  • I have run formatting tools (pre-commit or manual)
  • I have run relevant unit tests and they pass
  • I have added tests for new functionality
  • I have updated documentation if needed
  • My branch is up to date with main
  • This PR introduces breaking changes (if yes, fill out details below)
  • If this PR changes documentation, I have built and previewed it locally with jb build docs
  • No critical issues raised by AI reviewers (/gemini review)

Breaking Change Details (if applicable):

N/A

Additional Context

Key additions:

  • Reward Metrics: eval-rollout/reward, rollout/reward, ppo/actor/task_reward
  • Importance Weight Metrics: importance_weight, behave_imp_weight with decoupled PPO loss formula
  • Sequence Length Metrics: no_eos_ratio, seq_len for truncation detection

Files changed:

  • docs/best_practices/algo_perf.md: Add Important Metrics to Monitor section

Add comprehensive metrics monitoring guide with three subsections:

- Reward Metrics: eval-rollout/reward, rollout/reward, ppo/actor/task_reward
  with troubleshooting for high variance
- Importance Weight Metrics: Explain decoupled PPO loss formulation with
  importance_weight and behave_imp_weight, including troubleshooting tips
- Sequence Length Metrics: no_eos_ratio and seq_len for detecting truncation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @xssstory, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the reinforcement learning performance diagnostics documentation by integrating a comprehensive 'Important Metrics to Monitor' section. This new content aims to equip users with essential knowledge and troubleshooting steps for key metrics across reward, importance weight, and sequence length categories, ultimately fostering more stable training and earlier issue detection.

Highlights

  • New Documentation Section: A comprehensive 'Important Metrics to Monitor' section has been added to the RL performance diagnostics guide.
  • Reward Metrics Detailed: Detailed explanations and troubleshooting guidance are provided for eval-rollout/reward, rollout/reward, and ppo/actor/task_reward, focusing on identifying and resolving high variance.
  • Importance Weight Metrics Explained: The section introduces importance_weight and behave_imp_weight in the context of asynchronous training with decoupled PPO loss, including the mathematical formula and troubleshooting steps for deviations from 1.0.
  • Sequence Length Metrics for Truncation: Metrics such as ppo_actor/no_eos_ratio and ppo_actor/seq_len are added to help detect and troubleshoot trajectory truncation issues during training.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/best_practices/algo_perf.md
    • Added a new top-level section titled 'Important Metrics to Monitor'.
    • Included a 'Reward Metrics' subsection, detailing eval-rollout/reward, rollout/reward, and ppo/actor/task_reward, along with troubleshooting advice for task_reward variance.
    • Introduced an 'Importance Weight Metrics' subsection, explaining importance_weight and behave_imp_weight within the decoupled PPO loss framework, complete with the mathematical formula and troubleshooting for deviations.
    • Added a 'Sequence Length Metrics' subsection, covering ppo_actor/no_eos_ratio and ppo_actor/seq_len, and providing guidance for addressing high no_eos_ratio and monitoring seq_len growth.
Activity
  • No specific review comments or activity have been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a valuable 'Important Metrics to Monitor' section to the RL performance diagnostics guide. The new content is well-structured, providing clear explanations of key metrics for rewards, importance weights, and sequence length, along with practical troubleshooting advice. My review includes a correction for a typo in a parameter name and a suggestion to clarify a minor naming inconsistency to further improve the documentation's clarity for users.

- If deviation persists at `ppo_n_minibatches == 1` (common in MoE training), add
`actor.megatron.use_deterministic_algorithms=1` to your config.

**Troubleshooting `behave_imp_weight` deviations:**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a slight naming inconsistency that could be confusing for users. This section and the metric itself are named behave_imp_weight, but the corresponding configuration parameter is behav_imp_weight_cap. While this reflects the codebase, adding a small note to clarify this difference would enhance the documentation's clarity.

@garrett4wade
garrett4wade merged commit 78507cc into main Feb 5, 2026
1 check passed
@garrett4wade
garrett4wade deleted the metrics_to_minitor branch February 5, 2026 08:03
leandermaben pushed a commit to leandermaben/AReaL that referenced this pull request Mar 24, 2026
* docs: polish Important Metrics to Monitor section

Add comprehensive metrics monitoring guide with three subsections:

- Reward Metrics: eval-rollout/reward, rollout/reward, ppo/actor/task_reward
  with troubleshooting for high variance
- Importance Weight Metrics: Explain decoupled PPO loss formulation with
  importance_weight and behave_imp_weight, including troubleshooting tips
- Sequence Length Metrics: no_eos_ratio and seq_len for detecting truncation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix doc format

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: 博惟 <bowei.fw@antgroup.com>
SathyaGnanakumar pushed a commit to danielkiely/AReaL that referenced this pull request Apr 29, 2026
* docs: polish Important Metrics to Monitor section

Add comprehensive metrics monitoring guide with three subsections:

- Reward Metrics: eval-rollout/reward, rollout/reward, ppo/actor/task_reward
  with troubleshooting for high variance
- Importance Weight Metrics: Explain decoupled PPO loss formulation with
  importance_weight and behave_imp_weight, including troubleshooting tips
- Sequence Length Metrics: no_eos_ratio and seq_len for detecting truncation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix doc format

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: 博惟 <bowei.fw@antgroup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants